class Animal {
    constructor(name) {
      this.speed = 0;
      this.name = name;
    }
    run(speed) {
      this.speed = speed;
      console.info(`${this.name} runs with speed ${this.speed}.`);
    }
    stop() {
      this.speed = 0;
      console.info(`${this.name} stands still.`);
    }
  }
  
  let animal = new Animal("My animal");

  class Rabbit extends Animal {
    constructor(speed,name) {
        super(name)
        this.speed = speed;      
      }
    hide() {
      console.info(`${this.name} hides!`);
    }
    run() {
        console.info(`${this.name} runs with speed ${this.speed}.`);
      }
  }
  
  let rabbit = new Rabbit(12,"White Rabbit");
  
  rabbit.run(5); // White Rabbit runs with speed 5.
  rabbit.hide(); // White Rabbit hides!
  console.info(Rabbit.prototype)